/**
 * @project cf-esper-monitor
 * @file PersonMap.java
 * @package com.mindai.esper.monitor.sample
 * @date 2017年8月11日上午11:02:26
 * @copyright 民加科风信息技术有限公司 
 *
 */

package com.mindai.esper.monitor.sample;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.espertech.esper.client.EPAdministrator;
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.EPServiceProviderManager;

public class PersonMap {
  
  
  public static void main(String[] args) {
    
    EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider();    
    EPAdministrator admin = epService.getEPAdministrator();    
    // Person定义    
    Map<String,Object> person = new HashMap<String,Object>();    
    person.put("name", String.class);    
    person.put("age", int.class);    
    person.put("children", List.class);    
    person.put("phones", Map.class);    
    // 注册Person到Esper    
    admin.getConfiguration().addEventType("Person", person);    
  }

}
